Probability estimate for K-nearest neighbor

ABSTRACT

Systems and methods are disclosed that facilitate producing probabilistic outputs also referred to as posterior probabilities. The probabilistic outputs include an estimate of classification strength. The present invention intercepts non-probabilistic classifier output and applies a set of kernel models based on a softmax function to derive the desired probabilistic outputs. Such probabilistic outputs can be employed with handwriting recognition where the probability of a handwriting sample classification is combined with language models to make better classification decisions.

TECHNICAL FIELD

[0001] The present invention relates generally to the classification of patterns: more particularly, assigning class probabilities to novel input examples.

BACKGROUND OF THE INVENTION

[0002] Computer systems are ever increasingly employed to classify (e.g., recognize) objects. Classifiers or classification systems are typically employed to perform a variety of applications including identifying and/or classifying objects such as handwriting samples, medical images, faces, fingerprints, signals, automatic control phenomena, natural phenomena, nucleotide sequences and the like.

[0003] Classification systems often provide non-probabilistic outputs (e.g., object A belongs to class C). Such outputs are sufficient for some applications, but not others. Probabilistic outputs, also referred to as posterior probabilities, are required in many situations such as when combining classifiers with other knowledge sources, such as language models. The probabilistic output provides a probability for a class based on a given object or data point. Typically, this posterior probability is denoted by P(class|input).

[0004] One widely utilized, high-performance non-probabilistic classifier is the K nearest neighbor classifier (KNN). The KNN classifier is especially applicable for systems that operate with a relatively large numbers of classes (e.g., Asian handwriting recognition). As with other classifiers, the KNN classifier generates outputs that do not include probabilities. It would be advantageous to convert those outputs into usable probabilities. However, there fails to exist a suitable mechanism for converting the KNN classifier outputs into useful probabilities. Histogramming can sometimes be employed to generate probabilities from classifier outputs. However, there is often insufficient data to generate such probabilities with histogramming.

[0005] Another type of non-probabilistic classifier is a support vector machine (SVM). SVMs are a trainable classifier and are generally considered more accurate at classification than other classification methods in certain applications (e.g., text classification). They can also be more accurate than neural networks in certain applications such as reading handwritten characters for example. SVMs generate outputs that are uncalibrated values and do not include probabilities. Conventional approaches do exist to convert non-probabilistic outputs of SVM classifiers into probabilistic outputs. For example, a logistic function has been employed with SVM classifier outputs to convert the outputs into usable probabilities. However, the training speed of SVMs is often prohibitive for a large number of classes, so the KNN classifier is often preferred. However, conventional approaches fail to provide an adequate mechanism that convert non-probabilistic outputs of KNN classifiers into probabilistic outputs.

[0006] Probabilistic outputs can be produced by neural networks. A neural network is a multilayered, hierarchical arrangement of identical processing elements, also referred to as neurons. Each neuron can have one or more inputs and one output. The inputs are typically weighted by a coefficient. The output of a neuron is typically a function of the sum of its weighted inputs and a bias value (e.g., an activation function). The coefficients and the activation function generally determine the response or excitability of the neuron to input signals. In a hierarchical arrangement of neurons in a neural network, the output of a neuron in one layer can be an input to one or more neurons in a next layer. An exemplary neural network can include any suitable number of layers such as, an input layer, an intermediary layer and an output layer.

[0007] The utilization of neural networks typically involves two successive steps. First the neural network is initialized and trained on known inputs having known output values referred to as classifications. The network can be initialized by setting the weights and biases of neurons to random values, typically obtained via a Gaussian distribution. The neural network is then trained using a succession of inputs having known outputs referred to as classes. As the training inputs are fed to the neural network, the values of the coefficients (weights) and biases are adjusted utilizing a back-propagation technique such that the output of the neural network of each individual training pattern approaches or matches the known output to mitigate errors. Once trained, the neural network becomes a classifier to classify unknown inputs. By selecting a suitable function to specify cost of an error during training, outputs of a neural network classifier can be made to approximate posterior probabilities.

SUMMARY OF THE INVENTION

[0008] The following is a summary of the invention in order to provide a basic understanding of some aspects of the invention. This summary is not intended to identify key/critical elements of the invention or to delineate the scope of the invention. Its sole purpose is to present some concepts of the invention in a simplified form as a prelude to the more detailed description that is presented later.

[0009] Systems and methods are disclosed that facilitate producing probabilistic outputs also referred to as posterior probabilities. The probabilistic outputs include an estimate of classification strength. The present invention intercepts non-probabilistic classifier outputs and applies a set of kernel models, based on a softmax function, to derive desired probabilistic outputs. For example, a received data point is analyzed with respect to K-nearest neighbors, and a model is evaluated on the analyzed data. The model is trained via processing example inputs and outputs so as to train the model to provide probabilistic outputs, as compared to conventional schemes which simply provide non-probabilistic outputs. Such probabilistic outputs can be employed with handwriting recognition where the probability of a handwriting sample classification being above or below a given threshold might determine whether the sample is identified as the letter “j”, the letter “i”, or a stray pen mark altogether, for example. Additionally, by integrating with other sources of information, such as language models, the output of probabilities decreases likelihood of errors in handwriting recognition systems.

[0010] The present invention results in a probabilistic classification system that is well-informed and well-calibrated. Additionally, the invention maps non-probabilistic outputs to probabilistic outputs by employing a trained parametric model. The parameters of the model are trained via a suitable training set of data to provide probabilistic outputs in accordance with an acceptable test error amount.

[0011] To the accomplishment of the foregoing and related ends, certain illustrative aspects of the invention are described herein in connection with the following description and the annexed drawings. These aspects are indicative of various ways in which the invention may be practiced, all of which are intended to be covered by the present invention. Other advantages and novel features of the invention may become apparent from the following detailed description of the invention when considered in conjunction with the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0012]FIG. 1 is a block diagram illustrating a system that facilitates pattern recognition in accordance with an aspect of the present invention.

[0013]FIG. 2 is a block diagram illustrating a system that facilitates generation of posterior probabilities in accordance with an aspect of the present invention.

[0014]FIG. 3 is a block diagram illustrating normalization in accordance with aspects of the present invention.

[0015]FIG. 4 is a diagram illustrating an approach for a trained probability transducer in accordance with an aspect of the present invention.

[0016]FIG. 5 is a diagram illustrating an update rule for training a trained probability transducer in accordance with an aspect of the present invention.

[0017]FIG. 6 is a diagram illustrating an approach for a trained probability transducer in accordance with an aspect of the present invention.

[0018]FIG. 7 is a diagram illustrating an update rule for training a trained probability transducer in accordance with an aspect of the present invention.

[0019]FIG. 8 is a diagram illustrating an approach for a trained probability transducer in accordance with an aspect of the present invention.

[0020]FIG. 9 is a diagram illustrating an update rule for training a trained probability transducer in accordance with an aspect of the present invention.

[0021]FIG. 10 is a flow diagram illustrating a method of generating posterior probabilities in accordance with an aspect of the present invention.

[0022]FIG. 11 is a flow diagram illustrating a method of training a probability transducer in accordance with an aspect of the present invention.

[0023]FIG. 12 is a schematic block diagram of an exemplary operating environment for a system configured in accordance with the present invention.

[0024]FIG. 13 is a schematic block diagram of a sample-computing environment with which the present invention can interact.

DETAILED DESCRIPTION OF THE INVENTION

[0025] The present invention is now described with reference to the drawings, wherein like reference numerals are used to refer to like elements throughout. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It may be evident, however, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to facilitate describing the present invention.

[0026] As used in this application, the terms “component” and “system” are intended to refer to a computer-related entity, either hardware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a server and the server can be a component. One or more components may reside within a process and/or thread of execution and a component may be localized on one computer and/or distributed between two or more computers.

[0027]FIG. 1 is a block diagram that illustrates a system 100 in accordance with an aspect of the present invention. The system 100 facilitates producing probabilistic outputs also referred to as posterior probabilities—the probabilistic outputs include an estimate of classification strength. The present invention intercepts non-probabilistic classifier output and applies a learned parametric model to derive desired probabilistic outputs. For example, received data point(s) are analyzed with respect to K-nearest neighbors, and a model is built with the analyzed data. The model is trained via processing various inputs and outputs so as to train the model to provide probabilistic outputs from within acceptable error thresholds as compared to conventional schemes which provide non-probabilistic outputs. Probabilistic outputs are generated that can be employed in an application such as recognition of handwriting samples, medical images, faces, fingerprints, signals, automatic control phenomena, natural phenomena, nucleotide sequences and the like, for example.

[0028] The system 100 includes a trained classifier 102, a mapping component 104 and an application 106 and is described at a relatively high level to further illustrate the present invention. The system 100 can be implemented on a number of suitable devices such as, but not limited to, a personal computer, a personal digital assistant, a cellular telephone, a biometric device, and the like.

[0029] The trained classifier 102 receives a number of inputs and generates classifier outputs. The inputs can be feature vectors of objects to be classified. The classifier 102 is trained via a suitable training algorithm. A number of types of classifiers can be utilized, however a K nearest neighbor (KNN) type classifier is typically employed. For the KNN type classifier, a class of an input point is determined by measuring or determining distances of points in a database and obtaining the K nearest points (e.g., neighbors). Then, the class of those K nearest points is employed to determine the class of the input point (e.g., by a majority vote). Thus, the KNN classifier can provide as an output a distance of the input to K nearest points, the classes of the K nearest points, and/or the identities of the K nearest points.

[0030] The mapping component 104 converts the outputs from the trained classifier 102 into posterior probabilities, also referred to as probabilistic outputs. Generally, the mapping component 104 employs a probability model to convert or map the outputs from the trained classifier 102 into the posterior probabilities. The respective posterior probabilities are thus a function of a corresponding respective output and substantially all of the other outputs of the trained classifier 102.

[0031] A parametric model is employed by the mapping component 104 to perform the mapping. The parametric model has a varying number of parameters that are learned or trained. Once the parameters are trained (e.g., via a second training set disjoint from a first training set used to train classifier 102), the parametric model permits the mapping component 104 to compute probabilities from the classifier outputs. It is appreciated that the parametric model utilizing learned parameters is generally more accurate and efficient than an approach such as majority rule, wherein a posterior probability can be estimated by employing relative frequencies of occurrence(s) of a given class.

[0032] The application component 106 is operative to receive the posterior outputs from the mapping component 104. The application component 106 then employs the posterior outputs to perform a function such as, for example, handwriting recognition, medical image diagnoses (e.g., determining whether an image identifies a tumor), speech recognition, image compression and the like.

[0033] Turning now to FIG. 2, a block diagram of a system 200 that facilitates generation of posterior probabilities is depicted. The system 200 is similar to that of FIG. 1, but is described at a more detailed level. The system includes a distance computation component 202, a database of stored examples 204 and a trained probability transducer 206. The system 200 is computationally efficient and adjustable in that speed and accuracy can be traded off. Furthermore, the system 200 can also be referred to as a probabilistic classifier in that the system 200 produces probabilistic outputs that include class information. Additionally, the system 200 can be further referred to as a pattern recognition system.

[0034] The distance computation component 202 is a piecewise constant classifier and is operative to classify inputs without providing probabilities. The distance computation component 202 employs a K nearest neighbor (KNN) approach. The distance computation component 202 receives a number of inputs and generates K outputs. The K outputs each comprise a class, a distance, and/or an index of one of the K closest examples stored in database 204. The K outputs are sorted or ranked according to increasing distance to the inputs. Additionally, the K outputs are also referred to as a classifier output vector. The inputs are feature vectors of objects to be classified. The classifier and/or the system 200 is trained via a suitable training mechanism, typically via a P-admissible loss function, such that the outputs meet error requirements for a desired task.

[0035] The trained probability transducer 206 receives the K outputs from the distance computation component 202 and maps or converts the K outputs into posterior probabilities also referred to probabilistic outputs. The posterior probabilities can then be employed for a suitable application (e.g., such as handwriting analysis). The trained probability transducer 206 comprises a softmax function 208 and a parametric model 210.

[0036] The distance computation component 202 is generally implemented as a KNN classifier. As discussed with respect to FIG. 1, a KNN type classifier is particularly suitable for implementations involving large numbers of classes. For the KNN type classifier, a class of an input point is determined by measuring or determining distances of points in database 204 and obtaining the nearest points (e.g., neighbors). Then, the classes of those K nearest points are employed to determine the class of the input point or of a given point. Additionally, the distance computation 202 component can utilize kernels to transform the distances between test points and stored examples in database 204 into output values suitable for input to the parametric model 210. For example, one suitable kernel takes the exponential of the negative of a scaled Euclidean distance of a test point to a stored example and produces a Gaussian similarity measure between the test point and the stored example. Another such kernel can always produce a value of 1, as long as the stored example is in the K nearest stored examples to the test point.

[0037] The parametric model 210 can be implemented in a number of different embodiments, three of which are further described infra. The parametric models in each of the three embodiments comprise trained or learned parameters. The probability transducer 206 is trained via a suitable training method (e.g., minimizing a P-admissible loss function). Generally, a number of test points are input and the outputs are compared with expected results. Component parameters such as weights, coefficients and functions are adapted so as to produce outputs within a tolerable amount of error.

[0038] The system 200 is trained and developed such that it is well-informed and well-calibrated. Generally, a well-calibrated classifier is one for which, as the amount of training data increases (e.g., number of training points), the predicted probabilities converge to the measured frequencies. A well-informed classifier is one such that if an algorithm is employed to convert the classifiers outputs to probabilities, then the test error should not increase if the predicted posteriors are employed instead of the original (e.g., expected) outputs. Calibration and informativeness are typically somewhat dependent on each other. Thus, if the modeled or generated posterior probabilities are equal to the true or actuation probabilities, the resulting probabilities are well-informed and well-calibrated.

[0039] Another factor to be considered for the training of probability transducer 206 is P-admissibility, which is correlated with informativeness and calibration. It is desirable that the error metric to train probability transducer 206 is P-admissibile, which generally results in a classifier that is well informed and well calibrated. A P-admissible loss function L(y,y′) is a function which, for any given x, is minimized at y′=E[y|x], where E[y|x] denotes the expectation of y for a fixed, given value of x. Additionally, for the case of a single output variable, if probability transducer 206 does not have sufficient capacity to learn the true posterior, it still comes relatively close to the solution in the sense that minimizing the expectation of a P-admissible loss function over the joint distribution of x and y is equivalent to first replacing y by E[y|x] and then minimizing the expectation of the loss function over the marginal distribution p(x).

[0040] The probability transducer 206 is trained utilizing a set of training points separate from those stored in the database of stored examples 204. This is performed to circumvent an inherent bias that can be present in a trained KNN classifier (for example, if a trained KNN classifier is used to classify the data upon which it was trained, the ‘closest’ point to a given point x will be x itself, with distance zero, which is unlikely to occur on unseen test data). These separate training points are labeled as to correct class. The posterior probabilities generated by the trained probability transducer 206, also referred to as posteriors, are modeled utilizing the softmax function 208, also referred to as a softmax map, as follows: $\begin{matrix} {{P\left( c_{j} \middle| x \right)} = \frac{^{z{({x,c_{j},\alpha})}}}{\sum\limits_{i}^{\quad}^{z{({x,c_{i},\alpha})}}}} & (2) \end{matrix}$

[0041] The softmax map is a convenient tool to map the range of {z:−∞ . . . ∞} to [0,1]. The variable c_(j) in the numerator on the right hand side of (2) represents a hypothesized class of an input point, x represents a feature vector generated from the input point, c_(i) in the denominator of the right hand side of (2) represents classes of neighboring points, α represents parametric weights; and z() is the output of a trained parametric model 210 relating distance and class information. Note that the structure of the model resides in the choice of functional dependence of z on the x, c_(i), and α. A regularized log likelihood of the class labels is employed for the objective function, which is sought to be maximized (note that, dropping α-independent terms, this is equivalent to maximizing the regularized negative cross entropy): $\begin{matrix} {F = {{\sum\limits_{i = 1}^{m}{\sum\limits_{j = 1}^{C}{{P_{t}\left( c_{j} \middle| x_{i} \right)}\log \quad {P\left( c_{j} \middle| x_{i} \right)}}}} - {g(\alpha)}}} & (3) \end{matrix}$

[0042] where g(α) is a regularization function and P_(t)(c_(j)|x_(i)) is the true posterior probability. Assuming data is utilized without label noise, permits that P_(t)(c_(j)|x_(i))=δ_(c) _(j) _({overscore (c)}) _(i) where {overscore (c)}_(i) denotes the true class of point x_(i), and where δ_(c) _(j) _({overscore (c)}) _(i) is defined to take the value 1 if c_(i)=c_(j) and zero otherwise, and the objective function becomes: $\begin{matrix} {F = {{{\sum\limits_{i = 1}^{m}{\log \quad {P\left( {\overset{\_}{c}}_{i} \middle| x_{i} \right)}}} - {g(\alpha)}} \equiv {{\sum\limits_{i = 1}^{m}F_{i}} - {g(\alpha)}}}} & (4) \end{matrix}$

[0043] It is additionally appreciated that the data processed by the distance computation component 202 can be first normalized to further mitigate test errors. The data is normalized such that each point lies on a unit sphere (“unit norming”). This alleviates the problem of a bias that can occur with an ordinary Euclidean norm for handwriting applications, due to the fact that some digits (e.g., 2 and 8) have on average much more ink than others (e.g., digit 1). An example of unit norming is depicted in FIG. 3. With a Euclidean normalization, pattern A is equidistant to B and C. With unit normalization, pattern A is closer to C. Euclidean normalization 301 and unit normalization 302 distances are illustrated below the patterns. Experiments with and without unit norming demonstrate an advantage for unit norming.

[0044] We now turn to three different approaches for implementing the probability transducer 206, which exploit different models as the parametric model 210. These approaches of probability transducer 206 are depicted in FIGS. 4, 6, and 8. These approaches can be trained via stochastic gradient descent of the objective function in equation (4). The training of the embodiment of FIG. 4 is shown in FIG. 5. The training of the embodiment of FIG. 6 is shown in FIG. 7. The training of the embodiment of FIG. 8 is shown in FIG. 9.

[0045] For all three approaches, the probability transducer 206 accepts K outputs from distance computation 202 along K rows of the FIGS. 4, 6, and 8. Thus the N^(th) row in FIGS. 4, 6, and 8 corresponds to the N^(th) nearest neighbor, in rank order, to the input point. Each column in FIGS. 4, 6, and 8 corresponds to a particular hypothesized class for the input point: specifically, each of the C columns (classes) of FIGS. 4, 6, and 8 computes the output of the parametric model for a particular class. Thus, the three approaches comprise a plurality of rank-class computations, each of which lie on an intersection of a row and a column. A rank-class computation contains a model of how a single ranked output of the distance computation 202 influences the probability of a single class. The three approaches utilize varied rank-class computations.

[0046] Turning now to FIG. 4, a first approach for implementing the trained probability transducer 206 is illustrated. In FIG. 4, each output from the distance computation component 202 is depicted as comprising a class label 400 of the corresponding element in the database 204, and a distance 410 of the test point to the corresponding element in database 204. Recall that the distance computation component 202 can use a kernel to transform the true distance into a form suitable for input to the parametric model 210. In FIG. 4, each distance 410 is multiplied by a weight (a learned parameter) corresponding to its row. This multiplication is carried out by multiplier 450.

[0047] In FIG. 4, each rank-class computation 430 first compares the class label 400 to the class of the column 425 by component 440. Component 440 produces a+1 if they are the same class, and −1 otherwise. The result of component 440 is multiplied by the output of multiplier 450. This multiplication is performed by multiplier 460. The output of multiplier 460 is added to a partial sum 420 by adder 470. When the rows have contributed to the partial sum 420, the result is an output 480 (z_(i)) of the parametric model 210. Outputs for every column are then supplied to the softmax component 490 to produce a posterior probability for every class 495, where Σ_(i) denotes sum over index i.

[0048] There are alternatives for the initialization of partial sum 420. One alternative is to initialize it to zero. The preferred alternative is to initialize each partial sum 420 to a separate learned parameter, one per column (class).

[0049]FIG. 5 illustrates an update rule for the trained parameters depicted in FIG. 4. For FIG. 5, the K outputs are computed by sequentially applying the distance computation 202 to a second training set, separate from the training set used to create the database of stored examples 204.

[0050] Posterior probability 595 is computed by applying the probability transducer in FIG. 4 to the same example in the second training set that is providing the K distance outputs. The target probability 585 is the known probability that the current example in the second training set belongs to the class corresponding to the current column. An error signal is produced by subtracting the target probability 585 from the computed posterior probability 595. This subtraction is performed by subtractor 590. The error signal is scaled by a step size 575. This scaling is performed by multiplier 580. The scaled error signal is then supplied to the rank-class update computations 530 in the corresponding column. The scaled error is also applied at 520 to adjust the learned parameter that initializes the partial sum 420, if such a learned parameter is used in FIG. 4. For the update of the partial sum initialization parameter, the scaled error rate can be multiplied by an additional constant, to allow for the fact that the number of contributions to an update of the partial sum initialization parameters is different than the number of contributions to an update of the weight parameters, at a given iteration of the training process

[0051] Each rank-class update computation 530 compares the class 500 of the stored example in database 204 corresponding to its row to the class 525 of its column. This comparison is performed by component 540. The result of this comparison is +1 if the classes are the same, and −1 if they are different. The result of the comparison is multiplied by the scaled error at multiplier 560. Multiplier 550 then multiplies the result of multiplier 560 by the distance 510 of the example in database 204 to the current example in the second training set. Again, this distance may be modified by a kernel function. Finally, the output of the multipliers 550 are summed by adders 555 to produce an update for the weight parameter corresponding to the appropriate row.

[0052] It can be appreciated by those skilled in the art that FIG. 5 implements a stochastic gradient descent algorithm. Other suitable optimization algorithms can be also be employed in accordance with the subject invention. FIG. 5 can be modified to compute a complete gradient by removing multiplier 580 and accumulating the updates for the parameters over the second training set. Alternatively, P-admissible error metrics other than shown in equation (4) can be used.

[0053] Turning now to FIG. 6, a second approach for implementing the trained probability transducer 206 is depicted. FIG. 6 is analogous to FIG. 4, except that the form of the rank-class computation 630 is altered, and multiplier 450 is not utilized. Thus, some description is omitted for brevity. Class label 600 is analogous to class label 400. Distance 610 is analogous to distance 410. Column class label 625 is analogous to column class label 425. Initialization of the partial sum 620 is analogous to initialization of the partial sum 420. Parametric model output 680 is analogous to parametric model output 480. Softmax component 690 is analogous to softmax component 490. Posterior probability output 695 is analogous to posterior probability output 495.

[0054] Rank-class computation 630 uses class label 600 and column class label 625 to look up a value in a lookup table 640. The values in this lookup table depend on the row of the rank-class computation 630. If the number of possible classes is C, then the number of entries in each lookup table is C². The index set of the lookup table is the Cartesian product between the possible class labels 600 and column class labels 625. The values in lookup table 640 are trained parameters, and are updated by the process described in FIG. 7.

[0055] The value selected by lookup table 640 is multiplied by the distance 610 of the corresponding row. This multiplication is performed by multiplier 650. Adder 660 then takes the output of multiplier 650 and adds it to partial sum 620 for further computation.

[0056]FIG. 7 depicts an update rule for the trained parameters depicted in FIG. 6. FIG. 7 is similar to FIG. 5, except that the rank-class update computation 730 is altered, and there is no update of a per-row weight. As such, redundant descriptions are omitted for sake of brevity. Class label 700 is analogous to class label 500. Distance 710 is analogous to distance 510. Column class label 725 is analogous to column class label 525. Update of per-column parameter 720 is analogous to update of per-column parameter 520. Computation of the error signal by entities 775, 780, 785, 790, and 795 are analogous to computation of the error signal by entities 575, 580, 585, 590, and 595.

[0057] Rank-class update computation 730 multiplies the distance 700 of its row (ranked output point) by the scaled error of its column (class). This multiplication is performed by multiplier 750. The result of the multiplication is provided to the update of the lookup table, 740. The lookup table update 740 will modify one entry of each lookup table 640 for rank-class update computation(s) 730. The index of the modified entry is computed by combining the class label 700 of the row with the column class label 725, in the same manner as the index is computed by lookup table 640. The corresponding entry is the adjusted by the output of multiplier 750.

[0058]FIG. 7 computes a stochastic gradient descent of the error metric in equation (4). Analogous to FIG. 5, a different optimization method or a different P-admissible error metric can be used.

[0059] Turning now to FIG. 8, a third approach for implementing the trained probability transducer 206 is depicted. As with the other approaches (FIGS. 4 and 6), each row corresponds to an output from the distance computation component 202, sorted by rank, and each column corresponds to a particular class. According to this approach, the trained parametric model 210 comprises a plurality of rank-class computations 830.

[0060] For this approach, the distance computation component 202 is operative to produce, for each rank, an index 800 which identifies the N^(th) closest point in the database of stored examples 204 to the input point, a class label 805, which is the class of the N^(th) closest point in the database of stored examples 204; and a distance 810, which is the distance of the N^(th) closest point in the database of stored examples 204 to the input point. Again, the distance 810 may be computed via a kernel function. The initialization of the partial sum 820 is analogous to the initialization of the partial sum 420 in FIG. 4. The computation of the posterior probability 895 by softmax component 890 from the output 880 of the parametric model is analogous to the computation of the posterior probability 495 by softmax component 490 from the output 480.

[0061] Each rank-class computation 830 compares the class 805 of the N^(th) closest point to the class label 825 for its column. This comparison is performed by class determination component 845. The class determination component 845 produces a 1 if they are the same class, and a 0 otherwise. The value produced by the determination component 845 is multiplied by the distance 810. This multiplication is performed by multiplier 855. The result of this multiplication is multiplied by the output of the lookup table 840. The index used by the lookup table is the index 800 of the N^(th) closest point. There is a lookup table entry for each example in the database of stored examples 204. The multiplication of the lookup table result is performed by multiplier 850. The result of multiplier 850 is then added to the partial sum 820 by adder 860.

[0062] It can be appreciated by someone of ordinary skill in the art that if one of the multiplicands used by multiplier 855 is 0, the output is zero and hence the value added by adder 860 will also be zero. Therefore, only one of the rank-class computations 830 per row needs to be performed: the one occuring in the column whose class is equal to class 800 for the row. All other rank-class computations can be skipped. This approach uses only K rank-class computations 830, rather than KC rank-class computations in the other approaches, where K are the number of outputs of the distance computation component 202 and C is the number of classes.

[0063] It can also be appreciated that the rows of FIG. 9 are not distinguished: the same computation occurs on every row. Therefore, for such approach, the output of the distance computation component 202 need not be ranked.

[0064]FIG. 9 shows an update rule employed to train the implementation of the probability transducer 206 depicted in FIG. 8. It is analogous to the training update shown in FIG. 7, except that each output from distance computation 202 is here an index 900 of the N^(th) closest example to a point in the second training set, a class 905 of the same example, and a distance 910 of the same example. Analogous to the computation of posterior probability 795 in FIG. 7, the posterior probability 995 is computed by the process in FIG. 8 from the same point in the second training set that is also supplied to the distance computation component 202. The computation of the scaled error signal by components 975, 980, 985, and 990 is analogous to the computation of the scaled error signal in FIG. 7 by components 775, 780, 785, and 790. The update of the partial sum 920 is analogous to the update of the partial sum 720. The rank-class update computation 930 first compares the class 905 to the class label 925 for the column. This comparison is performed by determination component 945. The determination component 945 produces a 1 if they are the same, and a 0 otherwise. The result of the determination component 945 is multiplied by distance 910. This multiplication is performed by multiplier 955. The result from multiplier 955 is multiplied by the scaled error. This multiplication is performed by multiplier 950. The result of multiplier 950 is used by component 940 to update an entry in the lookup table. The index of the updated entry is the index 900.

[0065] As in FIG. 8, the rank-class update 930 only needs to be performed if the class 905 is the same as the class label 925 for the column. The other rank-class updates for that row can be skipped, because the result of multiplier 950 will always be zero. Therefore, only one rank-class update 930 needs to be performed per row.

[0066] The three approaches described above and illustrated in FIGS. 4-9 can be further illustrated with the following exemplary mathematical description(s). It is to be appreciated that the invention is not limited to such mathematical description(s), and discussion with respect thereto is merely being provided to facilitate understanding of the invention in accordance with specific implementations. The first approach, described by FIGS. 4 and 5 is further illustrated via the first model and the second model. The second approach, described by FIGS. 6 and 7 is further illustrated via the fourth model. Finally, the third approach, described by FIGS. 8 and 9 is further illustrated via the third model. The foregoing discussion with respect to FIGS. 4-9 as well as the following discussion is for illustrative purposes and is not intended to limit the present invention. It is appreciated that variations of the below models can be employed in accordance with the present invention.

[0067] The first model that can be utilized with the trained probability transducer 206 as the parametric model 208 is a “sparse rank ordering model.” This model enforces sparseness by construction as follows. For a kernel K(x,x_(i)), this model depends on the rank ordering of the nearest neighbors, and on the class labels of those nearest neighbors: $\begin{matrix} {{z\left( {x,c} \right)} = {\sum\limits_{i \in {l_{N}{(x)}}}^{\quad}{\left( {{w_{r_{i}}\delta_{{\overset{\_}{c}}_{i},c}} + {v_{r_{i}}\left( {1 - \delta_{{\overset{\_}{c}}_{i},c}} \right)}} \right){K\left( {x,x_{i}} \right)}}}} & (5) \end{matrix}$

[0068] where the parameters w_(r) _(i) and v_(r) _(i) are weights that are learned by training, and where I_(N)(x) denotes the index set of the N nearest neighbors to the point x, and where the subscript r_(i) denotes the rank of x_(i) in the list of the N nearest neighbors. This model has only N free parameters (further discussed below), thus the additional computation beyond that required to find I_(N) is minimal. The regularization function g(α) is set to zero (Eq. 4) since the number of parameters is small. F is then bounded above by zero, and at zero corresponds to the probability one being assigned to the correct class for every training pattern. By assigning a target probability of one for the correct class and zero for other classes, the update rule for the ith pattern is:

Δw _(r) _(j) =εK(x _(i) ,x _(j))(δ_({overscore (c)}) _(j) _({overscore (c)}) _(i) −P({overscore (c)} _(j) |x _(i)))=−Δv _(r) _(j)   (6)

[0069] Note that if Eq. 6 starts with w_(r) _(j) =v_(r) _(j) =0∀j, then v_(r) _(j) =−w_(r) _(j) always, so the model has just N parameters to learn (corresponding to the weight parameters 450 in FIG. 4) and Eq. (6) becomes: $\begin{matrix} {{z\left( {x_{i},c} \right)} = {\sum\limits_{j \in {l_{N}{(x)}}}^{\quad}{w_{r_{j}}{K\left( {x_{i},x_{j}} \right)}\left( {{2\delta_{\overset{\_}{c_{j}},c}} - 1} \right)}}} & (7) \end{matrix}$

[0070] A second model that can be employed with the trained probability transducer 206 as the parametric model 208 is an “adding class dependence model.” The first model described supra fails to parameterize per-class dependence; z(x,c) gets positive or negative contributions according to whether the class of the training point under consideration is the same, or not as c. However, such per-class information could be useful, for example, to model easily confused classes. Thus, C parameters b_(c) are added to the model (corresponding to the partial sum initialization parameters 420 in FIG. 4): $\begin{matrix} {{z\left( {x,c} \right)} = {{\sum\limits_{i = 1}^{N}{\left( {{w_{r_{i}}\delta_{{\overset{\_}{c}}_{i},c}} + {v_{r_{i}}\left( {1 - \delta_{{\overset{\_}{c}}_{i},c}} \right)}} \right){K\left( {x,x_{i}} \right)}}} + b_{c}}} & (8) \end{matrix}$

[0071] The update rules for the second model are as they are for the first model, but with the addition of Δb_(c)=ε′(δ_(cc) _(i) −P(c|x_(i))), where the update to the parameters b_(c) are given their own step size ε′, to allow for the fact that the number of contributions to an update of the b_(c) parameters is different than the number of contributions to an update of the w parameters, at a given iteration of the training process. As with the first model, v_(r) _(j) =−w_(r) _(j) , giving: $\begin{matrix} {{z\left( {x,c} \right)} = {{\sum\limits_{i = 1}^{N}{w_{r_{i}}{K\left( {x,x_{i}} \right)}\left( {{2\delta_{\overset{\_}{c_{i}},c}} - 1} \right)}} + b_{c}}} & (9) \end{matrix}$

[0072] as a suitable representative equation for the second model.

[0073] A third model that can be utilized with the trained probability transducer 206 as the parametric model 208 is a “per-point class model.” Here, the equation employed is: $\begin{matrix} {{z\left( {x,c} \right)} = {{\sum\limits_{{j \in {l_{N}{(x)}}},{\overset{\_}{c_{j}} = c}}^{\quad}{w_{j}{K\left( {x,x_{j}} \right)}}} + b_{c}}} & (10) \end{matrix}$

[0074] For this model, one parameter is utilized per training point, which corresponds to an entry in lookup table 830 of FIG. 8. The idea is to use the weights to model the value of each training point in predicting its own class. However, it is appreciated that rank information is not required with the third model. The indicator function is defined as, δ_(i)(x_(j)) to be a 1 if x_(i)εX_(N)(X_(j)) (where X_(N)(x_(j)) denotes the set of N points closest to x_(j)), 0 otherwise and the training update rules become ΔW_(i)=εδ_(i)(x_(j))K(x_(j),x_(i))(2δ_({overscore (c)}) _(i) _({overscore (c)}) _(j) −P({overscore (c)}_(i)|x_(j))) and Δb_(c)=ε′(δ_(c{overscore (c)}) _(j) −P(c|x_(j))). Note that the b_(c) and w_(i) are again given different learning rates. Since after one training epoch, the mean number of w_(i) updates per w_(i) parameter is N, and the mean number of b_(c) updates per b_(c) parameter is m, and assuming that ∂F_(j)/∂w_(i) and ∂F_(j)/∂b_(c) are of roughly the same size, requiring that the mean size of the updates also be roughly the same yields ε′=ε(N/m). This is necessary to ensure that choice of a suitable learning rate for the w_(i) results in a suitable learning rate also for the b_(c).

[0075] Although the number of parameters for the third model is large, in an evaluation phase, only O(N+C) operations are needed. The small number of parameters used to classify a given point permits not using a regularization term for the third model.

[0076] A fourth model that can be employed with the trained probability transducer 206 is a combined “Rank/Class/Class model” (RCC model). If the w_(r) _(j) is permitted to vary based on class as well as rank, then a class-dependent rank ordering can be learned. For example, suppose that N=3 and that a given test point has nearest neighbors of class 1, 1, 3 (rank ordered). If, for handwriting analysis, it is allowed that the probability that the test point is a 1 is different than if the nearest neighbors were 1, 1, 7, since 7's are more often confused with 1s than 3s are, then the proposed model is able to parameterize this information. Therefore, C²N parameters w_(r) _(j) _(c{overscore (c)}) _(j) are introduced, which correspond to the N different lookup tables 640, each containing C² entries. The second subscript c in w indexes the hypothesized target class; the third subscript {overscore (c)}_(j) is the class of the jth nearest neighbor. Since the number of parameters can become unwieldy for a large number of classes, a regularization scheme is required to enforce sparcity. Two illustrative examples of such a scheme are to add the L1 norm of the weights to the loss function F, so that g=λΣ_(j,c)|w_(jc{overscore (c)}) _(j) |, and a batch version, where after training epoch, a fraction (e.g., 90%) of the weights with the smallest values are set to zero. A justification for the latter is that it is closer to estimating the gradient in batch mode and provides better accuracy on a validation set. Thus, for this model: $\begin{matrix} {{z\left( {x,c} \right)} = {{\sum\limits_{j \in {l_{N}{(x)}}}^{\quad}{w_{r_{j}c\quad {\overset{\_}{c}}_{j}}{K\left( {x,x_{j}} \right)}\left( {{2\delta_{c\quad {\overset{\_}{c}}_{j}}} - 1} \right)}} + b_{c}}} & (11) \end{matrix}$

[0077] The update rules for the fourth model are, for the ith pattern:

[0078] Δw_(r) _(j) _(c{overscore (c)}) _(j) =εδ_(j)(x_(i))K(x_(i),x_(j))(2δ_({overscore (c)}) _(i) _({overscore (c)}) _(j) −1)(1−P({overscore (c)}_(i)|x_(i))) for c={overscore (c)}_(i) and Δw_(r) _(j) _(c{overscore (c)}) _(j) =−εδ_(j)(x_(i))K(x_(i),x_(j))(2δ_(c{overscore (c)}) _(j) −1)(1−P(c|x_(i))) for c≠{overscore (c)}_(i). The update rule for the priors b_(c) is as before. The learning rate for the b_(c) is chose to be 1/C times that for the w_(jcc) _(j) , for the same reasons described for the previous three models.

[0079] It is appreciated that other implementations and/or suitable trained parametric models in addition to or instead of the four described above can be employed for the trained probability transducer 206 and still be in accordance with the present invention. Further, it also appreciated that some parametric models do not require ranking and thus, the distance computation component 202 can be configured so as to not provide ranking information in order to increase computational efficiency.

[0080] In view of the foregoing structural and functional features described above, methodologies in accordance with various aspects of the present invention will be better appreciated with reference to FIGS. 10-11. While, for purposes of simplicity of explanation, the methodologies of FIGS. 10-11 is depicted and described as executing serially, it is to be understood and appreciated that the present invention is not limited by the illustrated order, as some aspects could, in accordance with the present invention, occur in different orders and/or concurrently with other aspects from that depicted and described herein. Moreover, not all illustrated features may be required to implement a methodology in accordance with an aspect the present invention.

[0081]FIG. 10 illustrates a flow diagram of a method 1000 that facilitates generation of posterior probabilities in accordance with an aspect of the present invention. The method 1000 employs a trained classifier and a trained probability transducer (e.g., a mapping component) to generate probabilistic outputs (e.g., posterior probabilities) which can then be employed for a pattern recognition application such as handwriting analysis.

[0082] The method begins at 1002, where data point(s) are received. The data point(s) comprise information such as, but not limited to, image data, measurements, audio data, database information and the like. The data point(s) are then processed individually to obtain a vector of ranked outputs at 1004, also referred to as classifier outputs. A given output respectively comprises a class label, an index identifying a particular element in the database used to train the classifier, a distance measure, and a ranking for K nearest neighbors. Generally, a KNN classifier is employed to generate the ranked outputs. The vector of ranked outputs does not include probabilistic information.

[0083] Subsequent to obtaining a vector of ranked outputs for respective data point(s), mapping or converting the outputs into probabilistic outputs (e.g., posterior probabilities) at 1006 via a suitable mapping mechanism (e.g., a trained parametric model). A suitable mechanism can be one of the models described with respect to FIG. 2. Then, the posterior probabilities are employed to perform an application such as handwriting analysis at 1008.

[0084] It is appreciated that sufficient training should be performed prior to utilizing the method 1000 for a pattern recognition application.

[0085]FIG. 11 is a flow diagram of a method 1100 of training a probability transducer in accordance with an aspect of the present invention. The probability transducer can be utilized in a system such as system 200 of FIG. 2. Generally, the method involves training a non-probabilistic classifier and subsequently utilizing the trained non- probabilistic classifier to train the probability transducer.

[0086] The method 1100 begins at block 1102, where a data set is split or segmented into a first training subset and a second training subset. The second training subset and the first training subset are disjoint. The data set comprises examples, and each example comprises an input data point and a class label. The split between the first and the second training subsets can be performed via a stochastic process. For example, 70% of the data set can be assigned at random to the first training subset, while the remaining 30% can be assigned to the second training set. At block 1104, the non-probabilistic classifier is trained using the first training set via a suitable training algorithm for non-probabilistic classifiers. For example, the training of a KNN classifier can be accomplished by loading the training set into a database of stored examples. Alternatively, other known methods, such as “reduced nearest neighbor”, can be employed wherein a subset of the training set can be selected for storage.

[0087] Continuing with block 1106, an example from the second training set is selected. Such selection can be accomplished by drawing an example at random, or by sequentially sweeping through a random permutation of the second training set. Alternatively, more sophisticated algorithms such a leave-one-out can be used in conjunction with block 1106. Block 1108 then applies the example selected at block 1106 to the non-probabilistic classifier. The output of the non-probabilistic classifier is then processed by the probability transducer to yield an output at block 1110. Depending on the implementation, block 1110 will execute the approaches described with respect to FIG. 4, FIG. 6, FIG. 8, and/or a similar method. Block 1112 then updates the parameters of the parametric model by comparing the output at block 1110 with the true class label of the example chosen at block 1106. Block 1112 uses an update rule, such as described with respect to FIG. 5, FIG. 7, FIG. 9 and/or suitable variations thereof, that is appropriate for the chosen implementation of the probability transducer. Alternatively, block 1112 can use a similar process to the update rule to compute the gradient of an error metric with respect to the parameters, and then periodically update the parameters based on the gradient or other information (e.g., such as the Hessian of the error metric).

[0088] Block 1114 then determines whether the training of the probability transducer is complete. The training may be complete when a pre-determined number of examples have been applied to the probability transducer 206, or when the rate of decrease of the error metric has reduced below a pre-determined threshold.

[0089] According to an alternate aspect of method 1100, the original data set at block 1102 is split into three subsets: a first training set, a second training set, and a validation set. After a pre-determined number of applications of examples to the probability transducer, all of the examples in the validation set may be applied to the system and the error metric can be used to measure the error on the validation set. If the error on the validation set has reached a minimum, the training may be stopped and the parameters of the parametric model that yielded the minimum error can be saved and used to evaluate new test points.

[0090] If the method 1100 determines that training is not finished at block 1114, then control flows back to block 1106, where another example is selected from the second training subset. Otherwise, training of the parametric model is complete and the probability transducer can be utilized (e.g., in a pattern recognition system) and/or a method that facilitates generating posterior probabilities (e.g., method 1000 of FIG. 10).

[0091]FIG. 12 illustrates one possible hardware configuration to support the systems and methods described herein. It is to be appreciated that although a standalone architecture is illustrated, that any suitable computing environment can be employed in accordance with the present invention. For example, computing architectures including, but not limited to, stand alone, multiprocessor, distributed, client/server, minicomputer, mainframe, supercomputer, digital and analog can be employed in accordance with the present invention.

[0092] With reference to FIG. 12, an exemplary environment 1210 for implementing various aspects of the invention includes a computer 1212, including a processing unit 1214, a system memory 1216, and a system bus 1218 that couples various system components including the system, memory to the processing unit 1214. The processing unit 1214 may be any of various commercially available processors. Dual microprocessors and other multi-processor architectures also can be used as the processing unit 1214.

[0093] The system bus 1218 may be any of several types of bus structure including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of commercially available bus architectures. The computer memory 1216 includes read only memory (ROM) 1220 and random access memory (RAM) 1222. A basic input/output system (BIOS), containing the basic routines that help to transfer information between elements within the computer 1212, such as during start-up, is stored in ROM 1220.

[0094] The computer 1212 may further include a hard disk drive 1224, a magnetic disk drive 1226, e.g., to read from or write to a removable disk 1228, and an optical disk drive 1230, e.g., for reading a CD-ROM disk 1232 or to read from or write to other optical media. The hard disk drive 1224, magnetic disk drive 1226, and optical disk drive 1230 are connected to the system bus 1218 by a hard disk drive interface 1234, a magnetic disk drive interface 1236, and an optical drive interface 1238, respectively. The computer 1212 typically includes at least some form of computer readable media. Computer readable media can be any available media that can be accessed by the computer 1212. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer 1212. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer readable media.

[0095] A number of program modules may be stored in the drives and RAM 1222, including an operating system 1240, one or more application programs 1242, other program modules 1244, and program non-interrupt data 1246. The operating system 1240 in the computer 1212 can be any of a number of commercially available operating systems.

[0096] A user may enter commands and information into the computer 1212 through a keyboard 1248 and a pointing device, such as a mouse 1250. Other input devices (not shown) may include a microphone, an IR remote control, a joystick, a game pad, a satellite dish, a scanner, or the like. These and other input devices are often connected to the processing unit 1214 through a serial port interface 1252 that is coupled to the system bus 1218, but may be connected by other interfaces, such as a parallel port, a game port, a universal serial bus (“USB”), an IR interface, etc. A monitor 1254, or other type of display device, is also connected to the system bus 1218 via an interface, such as a video adapter 1256. In addition to the monitor, a computer typically includes other peripheral output devices (not shown), such as speakers, printers etc.

[0097] The computer 1212 may operate in a networked environment using logical and/or physical connections to one or more remote computers, such as a remote computer(s) 1258. The remote computer(s) 1258 may be a workstation, a server computer, a router, a personal computer, microprocessor based entertainment appliance, a peer device or other common network node, and typically includes many or all of the elements described relative to the computer 1212, although, for purposes of brevity, only a memory storage device 1260 is illustrated. The logical connections depicted include a local area network (LAN) 1262 and a wide area network (WAN) 1264. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets and the Internet.

[0098] When used in a LAN networking environment, the computer 1212 is connected to the local network 1262 through a network interface or adapter 1266. When used in a WAN networking environment, the computer 1212 typically includes a modem 1268, or is connected to a communications server on the LAN, or has other means for establishing communications over the WAN 1264, such as the Internet. The modem 1268, which may be internal or external, is connected to the system bus 1218 via the serial port interface 1252. In a networked environment, program modules depicted relative to the computer 1212, or portions thereof, may be stored in the remote memory storage device 1260. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.

[0099]FIG. 13 is a schematic block diagram of a sample-computing environment 1300 with which the present invention can interact. The system 1300 includes one or more client(s) 1310. The client(s) 1310 can be hardware and/or software (e.g., threads, processes, computing devices). The system 1300 also includes one or more server(s) 1330. The server(s) 1330 can also be hardware and/or software (e.g., threads, processes, computing devices). The servers 1330 can house threads to perform transformations by employing the present invention, for example. One possible communication between a client 1310 and a server 1330 may be in the form of a data packet adapted to be transmitted between two or more computer processes. The system 1300 includes a communication framework 1350 that can be employed to facilitate communications between the client(s) 1310 and the server(s) 1330. The client(s) 1310 are operably connected to one or more client data store(s) 1360 that can be employed to store information local to the client(s) 1310. Similarly, the server(s) 1330 are operably connected to one or more server data store(s) 1340 that can be employed to store information local to the servers 1330.

[0100] It is to be appreciated that, for purposes of the present invention, any or all of the functionality associated with modules, systems and/or components discussed herein can be achieved in any of a variety of ways (e.g. combination or individual implementations of active server pages (ASPs), common gateway interfaces (CGIs), application programming interfaces (API's), structured query language (SQL), component object model (COM), distributed COM (DCOM), system object model (SOM), distributed SOM (DSOM), ActiveX, common object request broker architecture (CORBA), database management systems (DBMSs), relational database management systems (RDBMSs), object-oriented database management system (ODBMSs), object-relational database management systems (ORDBMS), remote method invocation (RMI), C, C++, practical extraction and reporting language (PERL), applets, HTML, dynamic HTML, server side includes (SSIs), extensible markup language (XML), portable document format (PDF), wireless markup language (WML), standard generalized markup language (SGML), handheld device markup language (HDML), graphics interchange format (GIF), joint photographic experts group (JPEG), binary large object (BLOB), other script or executable components).

[0101] What has been described above includes examples of the present invention. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the present invention, but one of ordinary skill in the art may recognize that many further combinations and permutations of the present invention are possible. Accordingly, the present invention is intended to embrace all such alterations, modifications and variations that fall within the spirit and scope of the appended claims. Furthermore, to the extent that the term “includes” is used in either the detailed description or the claims, such term is intended to be inclusive in a manner similar to the term “comprising” as “comprising” is interpreted when employed as a transitional word in a claim. 

What is claimed is:
 1. A pattern recognition system comprising: a classifier that receives pattern-related indicia and classifies the indicia employing a K nearest neighbor approach; and a trained probability transducer that calculates posterior probabilities of classes based on outputs of the classifier.
 2. The system of claim 1, the pattern related indicia comprising scanned images of handwriting.
 3. The system of claim 1, the pattern related indicia comprising medical images.
 4. The system of claim 1, the pattern related indicia comprising audio data.
 5. The system of claim 1, the outputs being ranked.
 6. The system of claim 1, the outputs comprising a class and distance.
 7. The system of claim 6, the classifier comprising a kernel function that computes the distance.
 8. The system of claim 1, the outputs comprising an index into a stored database of examples, a class, and a distance.
 9. The system of claim 8, the classifier comprising a kernel function that computes the distance.
 10. The system of claim 1, the trained probability transducer comprising a softmax component.
 11. The system of claim 10, the trained probability transducer further comprising a trained parametric model.
 12. The system of claim 11, the trained parametric model comprising a plurality of rank-class computations.
 13. The system of claim 12, the rank-class computations comprising a comparison between a class output produced by the classifier and a second class.
 14. The system of claim 12, the rank-class computations comprising a lookup table, wherein the index into the lookup table depends on a class output produced by the classifier and a second class.
 15. The system of claim 12, the rank-class computations comprising a lookup table, wherein the index into the lookup table depends on an index output produced by the classifier.
 16. The system of claim 11, the trained parametric model comprising learned partial sum initializations.
 17. The system of claim 11, the trained parametric model comprising one parameter per rank.
 18. The system of claim 11, the trained parametric model comprising one lookup table per rank.
 19. The system of claim 11, the trained parametric model comprising a lookup table, the lookup table containing one entry for each example in a training set.
 20. A method that generates posterior probabilities comprising: computing a non-probabilistic classifier output for a data point, the non-probabilistic classifier output comprising a ranked vector of outputs; and computing probabilistic outputs for the data point from the ranked vector of outputs utilizing a trained parametric model.
 21. The method of claim 20, the probabilistic outputs comprising a probability and class for the given data point.
 22. A method of training a K nearest neighbor classifier, comprising: obtaining a set of data comprising a first subset of training data and a second subset of training data; training the K nearest neighbor classifier on the first subset of training data; sequentially processing the second subset of training data to compute K nearest neighbor classifier outputs for respective points of the second set of training data; and determining parameters for a parametric model according to the K nearest neighbor classifier outputs, and true outputs of respective points of the second set of training data.
 23. A system for performing handwriting recognition employing the method of claim
 22. 24. A computer readable medium storing computer executable instructions for performing the method of claim
 22. 25. A classification system comprising: means for computing a non-probabilistic classifier output for at least one data point, the non-probabilistic classifier output comprising a ranked vector of outputs; and means for computing probabilistic outputs for the at least one data point from the ranked vector of outputs utilizing a trained parametric model. 